package main.Q701_800;

import java.util.HashSet;
import java.util.Set;

public class Q771_780 {
    public static void main(String[] args) {
        System.out.println("Question771：宝石与石头");
        System.out.println("Question772：");
        System.out.println("Question773：");
        System.out.println("Question774：");
        System.out.println("Question775：");
        System.out.println("Question776：");
        System.out.println("Question777：");
        System.out.println("Question778：");
        System.out.println("Question779：");
        System.out.println("Question780：");
    }
}

class Question771{
    public int numJewelsInStones(String jewels, String stones) {
        Set<Character> set=new HashSet<>();
        for (char c: jewels.toCharArray()) set.add(c);
        int count=0;
        for (char c: stones.toCharArray()) {
            if (set.contains(c)) count++;
        }
        return count;
    }
}